home *** CD-ROM | disk | FTP | other *** search
/ The Best of Windows 95.com 1996 September / WIN95_09962.iso / themestz / xf-them2.zip / Installation Script.bat < prev    next >
DOS Batch File  |  1996-08-02  |  9KB  |  265 lines

  1. @echo off
  2. cls
  3.  
  4. REM Automated installation procedure for "X-Files - The Theme v2.0"
  5. REM Version 2.0, August 2, 1996
  6. REM
  7. REM D.Sanders, email: danny@stack.urc.tue.nl
  8. REM
  9. REM This file must be run from Windows 95!
  10.  
  11. REM ====================================================================================
  12.  
  13.     echo ===============================================================================
  14.     echo                             X-Files - The Theme v2.0
  15.     echo                        Automated Installation Program v2.0
  16.     echo                                 by Danny Sanders
  17.     echo                                  August 2, 1996
  18.     echo ===============================================================================
  19.     goto windows
  20.  
  21. REM ====================================================================================
  22.  
  23. REM Check for Windows environment
  24. :windows
  25.     if "%windir%"=="" goto no_win
  26.     goto longname
  27.  
  28. REM Check for long filenames.
  29. :longname
  30.     if not exist "Installation Script.bat" goto bad_unzip
  31.     goto plus
  32.  
  33. REM Check for Plus! installation.
  34. :plus
  35.     if not exist "%windir%\system\themes.cpl" goto bad_plus
  36.     goto vbrun
  37.  
  38. REM Check for Visual Basic library.
  39. :vbrun
  40.     if not exist "%windir%\system\vbrun300.dll" goto no_vbrun
  41.     goto source
  42.  
  43. REM Check for source files.
  44. :source
  45.     if not exist logo.sys goto no_logo
  46.     if not exist logos.sys goto no_logos
  47.     if not exist logow.sys goto no_logow
  48.     if not exist "amertype.ttf" goto no_font
  49.     if not exist "Uninstall X-Files logos.bat" goto no_unlogo
  50.     if not exist "Reinstall X-Files logos.bat" goto no_relogo
  51.     if not exist "X-Files Screensaver.scr" goto no_scr
  52.     if not exist "X-Files - The Theme v2.0.theme" goto no_theme
  53.     if not exist "X-Files - The Theme v2.0\nul" goto no_dir
  54.     goto target
  55.  
  56. REM Check for target folder
  57. :target
  58.     if "%1"=="" goto check_std
  59.     if not exist "%1\nul" goto wrong_dir
  60.     goto cust_copy
  61.  
  62. REM Check for default target folder
  63. :check_std
  64.     if not exist "c:\program files\plus!\themes\nul" goto no_stdir
  65.     goto std_copy
  66.  
  67. REM ====================================================================================
  68.  
  69. REM Installing files to standard folder.
  70. :std_copy
  71.     echo  
  72.     echo Installing files, please wait...
  73.     if not exist "c:\program files\plus!\themes\X-Files - The Theme v2.0\nul" md "c:\program files\plus!\themes\X-Files - The Theme v2.0" >nul
  74.     copy "X-Files - The Theme v2.0\*.*" "c:\program files\plus!\themes\X-Files - The Theme v2.0" >nul
  75.     copy "X-Files - The Theme v2.0.theme" "c:\program files\plus!\themes" >nul
  76.     copy "Uninstall X-Files logos.bat" "c:\program files\plus!\themes" >nul
  77.     copy "Reinstall X-Files logos.bat" "c:\program files\plus!\themes" >nul
  78.     if exist c:\logo.sys if not exist c:\logo.w95 ren c:\logo.sys logo.w95
  79.     copy logo.sys c:\ >nul
  80.     if exist "%windir%\logos.sys" if not exist "%windir%\logos.w95" ren "%windir%\logos.sys" logos.w95
  81.     copy logos.sys %windir% >nul
  82.     if exist "%windir%\logow.sys" if not exist "%windir%\logow.w95" ren "%windir%\logow.sys" logow.w95
  83.     copy logow.sys %windir% >nul
  84.     copy "X-Files Screensaver.scr" %windir% >nul
  85.     copy "amertype.ttf" %windir%\fonts >nul
  86.     goto std_end
  87.  
  88. REM Installing files to custom folder.
  89. :cust_copy
  90.     echo  
  91.     echo Installing files, please wait...
  92.     if not exist "%1\X-Files - The Theme v2.0\nul" md "%1\X-Files - The Theme v2.0" >nul
  93.     copy "X-Files - The Theme v2.0\*.*" "%1\X-Files - The Theme v2.0" >nul
  94.     copy "X-Files - The Theme v2.0.theme" "%1\" >nul
  95.     copy "Uninstall X-Files logos.bat" "%1\" >nul
  96.     copy "Reinstall X-Files logos.bat" "%1\" >nul
  97.     if exist c:\logo.sys if not exist c:\logo.w95 ren c:\logo.sys logo.w95
  98.     copy logo.sys c:\ >nul
  99.     if exist "%windir%\logos.sys" if not exist "%windir%\logos.w95" ren "%windir%\logos.sys" logos.w95
  100.     copy logos.sys %windir% >nul
  101.     if exist "%windir%\logow.sys" if not exist "%windir%\logow.w95" ren "%windir%\logow.sys" logow.w95
  102.     copy logow.sys %windir% >nul
  103.     copy "X-Files Screensaver.scr" %windir% >nul
  104.     copy "amertype.ttf" %windir%\fonts >nul
  105.     goto cust_end
  106.  
  107. REM ====================================================================================
  108.  
  109. REM Start Desktop Themes
  110. :std_end
  111.     echo  
  112.     echo Starting Desktop Themes, please wait...
  113.     if exist "c:\program files\plus!\themes.exe" goto load_it
  114.     start "c:\program files\plus!\themes\X-Files - The Theme v2.0.theme" >nul
  115.     goto finish
  116.  
  117. REM Apply Theme Settings
  118. :load_it
  119.     "c:\program files\plus!\themes.exe" /s "c:\program files\plus!\themes\X-Files - The Theme v2.0.theme"
  120.     goto done
  121.  
  122. REM Start Desktop Themes
  123. :cust_end
  124.     echo  
  125.     echo Starting Desktop Themes, please wait...
  126.     start "%1\X-Files - The Theme v2.0.theme" >nul
  127.     goto finish
  128.  
  129. REM Print message.
  130. :finish
  131.     echo  
  132.     echo X-Files - The Theme v2.0 installed succesfully. You may now close this window
  133.     echo and use "Desktop Themes" to apply the theme's settings to your desktop.
  134.     goto end
  135.  
  136. REM Print message.
  137. :done
  138.     echo  
  139.     echo X-Files - The Theme v2.0 installed succesfully. Please wait while the theme
  140.     echo is applied to your desktop.
  141.     goto end
  142.  
  143. REM ====================================================================================
  144.  
  145. REM Print errormessage
  146. :no_win
  147.   echo  
  148.   echo The installation script hasn't been able to detect Microsoft Windows 95, which
  149.   echo is needed to perform the installation. Please start Windows 95 and try again.
  150.   goto end
  151.  
  152.  
  153. REM Print errormessage
  154. :bad_unzip
  155.   echo  
  156.   echo The installation script has detected a problem with the filenames. Most likely
  157.   echo you have used an old unzip program that doesn't support long filenames. Please
  158.   echo refer to the "readme.txt" file for more detailed information.
  159.   goto end
  160.  
  161. REM Print errormessage
  162. :bad_plus
  163.   echo  
  164.   echo The installation script has detected that you don't have the "Desktop Themes"
  165.   echo from Microsoft Plus! for Windows 95 installed, which is required to use this
  166.   echo theme. Please refer to the documentation for more detailed information.
  167.   goto end
  168.  
  169. REM Print errormessage
  170. :no_vbrun
  171.   echo  
  172.   echo The installation script has detected that the Visual Basic 3.0 Runtime Library
  173.   echo (vbrun300.dll) is not present in your System folder. This file is required by
  174.   echo the theme's screensaver. The installation will continue normally, but the
  175.   echo screensaver will not work until you have installed this file. Please refer to
  176.   echo the documentation for information on how to obtain this file.
  177.   echo  
  178.   pause
  179.   goto source
  180.  
  181. REM Print errormessage
  182. :wrong_dir
  183.   echo  
  184.   echo The destination folder you specified does not exist. Please make sure the
  185.   echo specified folder exists.
  186.   goto end
  187.  
  188. REM Print errormessage
  189. :no_stdir
  190.   echo  
  191.   echo The default destination folder (c:\program files\plus!\themes) does not exist.
  192.   echo Please specify the destination folder on the command line.
  193.   echo  
  194.   echo Example: "Theme installation.bat" "c:\desktop themes"
  195.   goto end
  196.  
  197. REM Print errormessage
  198. :no_logo
  199.   echo  
  200.   echo The installation script can't find the file "logo.sys". Please make sure that
  201.   echo this file is present in the same folder as the script.
  202.   goto end
  203.  
  204. REM Print errormessage
  205. :no_logos
  206.   echo  
  207.   echo The installation script can't find the file "logos.sys". Please make sure that
  208.   echo this file is present in the same folder as the script.
  209.   goto end
  210.  
  211. REM Print errormessage
  212. :no_logow
  213.   echo  
  214.   echo The installation script can't find the file "logow.sys". Please make sure that
  215.   echo this file is present in the same folder as the script.
  216.   goto end
  217.  
  218. REM Print errormessage
  219. :no_font
  220.   echo  
  221.   echo The installation script can't find the file "Amertype.ttf". Please make sure
  222.   echo that this file is present in the same folder as the script.
  223.   goto end
  224.  
  225. REM Print errormessage
  226. :no_unlogo
  227.   echo  
  228.   echo The installation script can't find the file "Uninstall X-Files logos.bat".
  229.   echo Please make sure that this file is present in the same folder as the script.
  230.   goto end
  231.  
  232. REM Print errormessage
  233. :no_relogo
  234.   echo  
  235.   echo The installation script can't find the file "Reinstall X-Files logos.bat".
  236.   echo Please make sure that this file is present in the same folder as the script.
  237.   goto end
  238.  
  239. REM Print errormessage
  240. :no_scr
  241.   echo  
  242.   echo The installation script can't find the file "X-Files Screensaver.scr". Please
  243.   echo make sure that this file is present in the same folder as the script.
  244.   goto end
  245.  
  246. REM Print errormessage
  247. :no_theme
  248.   echo  
  249.   echo The installation script can't find the file "X-Files - The Theme v2.0.theme".
  250.   echo Please make sure that this file is present in the same folder as the script.
  251.   goto end
  252.  
  253. REM Print errormessage
  254. :no_dir
  255.   echo  
  256.   echo The installation script can't find the folder "X-Files - The Theme v2.0".
  257.   echo Please make sure that this folder is present in the same folder as the script.
  258.   goto end
  259.  
  260. REM ====================================================================================
  261.  
  262. REM End.
  263. :end
  264.   echo  
  265.